<!-- 健康评测 -->
<script lang="ts" setup>
import { adminUrl } from '~/api/useHttp'

definePageMeta({
  layout: 'frame',
})
const route = useRoute()
const router = useRouter()

const title = computed(() => '填写记录分析')
const routePath = computed(() => {
  if (route.query.title) {
    if (route.query.from === 'home') {
      return [{ name: '首页', type: 'home' }, { name: route.query.title }]
    }
    return [{ name: '首页', type: 'home' }, { name: route.query.title }]
  }
  else {
    return [{ name: '首页', type: 'home' }, { name: '填写记录分析' }]
  }
})
const webUrl = computed(() => route.query.no ? `${adminUrl}/woa/#/pages/specific/questionnaire/questionnaireAnalysis/questionnaireAnalysisPc?formType=form&activity_no=${route.query.no}&status=${route.query.status || '进行中'}` : '')
function back() {
  router.go(-1)
}
</script>

<template>
  <div class="relative py-50px">
    <div class="absolute left-0 top-0 z--1 hidden h-570px w-full bg-[linear-gradient(180deg,_rgba(39,162,128,1)_0%,rgba(39,162,128,0)_100%)] md:block" />
    <div class="no-repeat absolute left-0 top-0 z--1 hidden h-400px w-full bg-[url(/img/bg-top.png)] bg-cover md:block" />
    <CommonPageContainer :path="routePath" :title="title">
      <div class="my-20px bg-#F7F9FD p-30px">
        <div class="mb-20px flex items-center">
          <div
            class="m-l--50px h-40px w-40px cursor-pointer rounded-6px bg-[linear-gradient(159.97deg,_rgba(206,234,158,1)_-140.78%,rgba(53,179,137,1)_89.45%)]"
            flex="~ items-center justify-center"
            title="返回"
            @click="back"
          >
            <i class="i-fa-solid:chevron-circle-left text-white" />
          </div>
          <div v-if="route.query.title" class="ml-14px text-20px text-#0E9472 font-600 line-height-30px">
            {{ route.query.title }}
          </div>
        </div>
        <IframeView :url="webUrl" style="width: 100%;height: 100vh;" />
      </div>
    </CommonPageContainer>
  </div>
</template>

<style>

</style>
